package handin07;

public class Employee extends AbstractPerson implements IEmployee{
	
	private double salary;
	private String title;

	public Employee(String name, String street, String zip, String city, double salary, String jobtitle) {
		super(name, street, zip, city);
		this.salary = salary;
		title = jobtitle;
	}

	@Override
	public double getSalary() {
		return this.salary;
	}

	@Override
	public String getTitle() {
		return this.title;
	}
	
	@Override
	public boolean equals (Object c)
	{
		if(this == c){
			return true;
		} else if (c instanceof Employee){
			Employee other = (Employee) c;
			if(other.getName().equalsIgnoreCase(getName())){
				return true;
			}
		}		
		return false;
	}
}
